package com.cb.eduservice.client;

import com.cb.eduservice.client.impl.VodFileDegradeFeignClient;
import com.cb.utils.R;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "service-vod", fallback = VodFileDegradeFeignClient.class)
@Component
public interface VodClient {

    /**
     * 根据视频id删除阿里云中的视频
     * @param id
     * 视频id
     */
    @DeleteMapping("/vodservice/video/removeAliyunVideo/{id}")
    R removeAliyunVideo(@PathVariable("id") String id);

    /**
     * 根据视频id删除多个阿里云中的视频
     */
    @DeleteMapping("/vodservice/video/removeBatchAliyunVideo")
    R removeBatchAliyunVideo(@RequestParam("videoIdList") List<String> videoIdList);
}
